package flatbuf
import (
flatbuffers "github.com/google/flatbuffers/go"
)
type DictionaryBatch struct {
_tab flatbuffers .Table
}
func GetRootAsDictionaryBatch (buf []byte , offset flatbuffers .UOffsetT ) *DictionaryBatch {
n := flatbuffers .GetUOffsetT (buf [offset :])
x := &DictionaryBatch {}
x .Init (buf , n +offset )
return x
}
func (rcv *DictionaryBatch ) Init (buf []byte , i flatbuffers .UOffsetT ) {
rcv ._tab .Bytes = buf
rcv ._tab .Pos = i
}
func (rcv *DictionaryBatch ) Table () flatbuffers .Table {
return rcv ._tab
}
func (rcv *DictionaryBatch ) Id () int64 {
o := flatbuffers .UOffsetT (rcv ._tab .Offset (4 ))
if o != 0 {
return rcv ._tab .GetInt64 (o + rcv ._tab .Pos )
}
return 0
}
func (rcv *DictionaryBatch ) MutateId (n int64 ) bool {
return rcv ._tab .MutateInt64Slot (4 , n )
}
func (rcv *DictionaryBatch ) Data (obj *RecordBatch ) *RecordBatch {
o := flatbuffers .UOffsetT (rcv ._tab .Offset (6 ))
if o != 0 {
x := rcv ._tab .Indirect (o + rcv ._tab .Pos )
if obj == nil {
obj = new (RecordBatch )
}
obj .Init (rcv ._tab .Bytes , x )
return obj
}
return nil
}
func (rcv *DictionaryBatch ) IsDelta () bool {
o := flatbuffers .UOffsetT (rcv ._tab .Offset (8 ))
if o != 0 {
return rcv ._tab .GetBool (o + rcv ._tab .Pos )
}
return false
}
func (rcv *DictionaryBatch ) MutateIsDelta (n bool ) bool {
return rcv ._tab .MutateBoolSlot (8 , n )
}
func DictionaryBatchStart (builder *flatbuffers .Builder ) {
builder .StartObject (3 )
}
func DictionaryBatchAddId (builder *flatbuffers .Builder , id int64 ) {
builder .PrependInt64Slot (0 , id , 0 )
}
func DictionaryBatchAddData (builder *flatbuffers .Builder , data flatbuffers .UOffsetT ) {
builder .PrependUOffsetTSlot (1 , flatbuffers .UOffsetT (data ), 0 )
}
func DictionaryBatchAddIsDelta (builder *flatbuffers .Builder , isDelta bool ) {
builder .PrependBoolSlot (2 , isDelta , false )
}
func DictionaryBatchEnd (builder *flatbuffers .Builder ) flatbuffers .UOffsetT {
return builder .EndObject ()
}
The pages are generated with Golds v0.8.2 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .